package com.panshi.service;

import com.panshi.entity.AppAnswerT;
import com.panshi.entity.SysAnswerCheckT;
import com.panshi.service.impl.AnswerClientServiceFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Service
@FeignClient(value = "HASBEI-ANSWER-PROVIDER-8004-XHLMR" ,fallbackFactory = AnswerClientServiceFallbackFactory.class)
public interface AnswerClientService {

    @GetMapping("/app-answer-t/all")
    public List<AppAnswerT> all();

    @GetMapping("/app-answer-t/bymid/{id}")
    public AppAnswerT bymid(@PathVariable("id") Integer id);

    @ApiOperation("回答添加审核")
    @PostMapping("/sys-answer-check-t/answerAdd")
    public Boolean answerAdd(@RequestBody SysAnswerCheckT sysAnswerCheckT);
}
